﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Universitario.DAO
{
    public class CoordenadorCursoDAO
    {
        private static DataClasses1DataContext dc = new DataClasses1DataContext();

        public static Coordenador_Curso SelectByCPFSenha(String cpf, String senha)
        {
            var query = from coord in dc.Coordenador_Cursos
                        join usuario in dc.Usuarios
                        on coord.usuario_id equals usuario.id
                        where usuario.cpf == cpf &&
                        usuario.senha == senha
                        select coord;

            return query.FirstOrDefault();
        }
    }
}